package com.cwf.metadatamanage.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cwf.metadatamanage.model.dtos.ColumnDto;
import com.cwf.metadatamanage.model.pojo.Column;
import io.lettuce.core.dynamic.annotation.Param;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 * 元数据
 * Mapper 接口
 * </p>
 *
 * @author chenweifeng
 * @since 2021-09-01
 */
@Mapper
public interface ColumnMapper extends BaseMapper<Column> {

    /**
     * 通过tableId获取所有column
     *
     * @param tableId
     * @return
     */
    List<ColumnDto> selectByTableId(@Param("tableId") Long tableId);

    /**
     * 批量插入column
     *
     * @param columnList
     * @return
     */
    int insertList(List<Column> columnList);
}
